.tree--custom {
  position: relative;

  .ant-tree-node-content-wrapper {
    width: calc(100% - 16px);
  }

  .tree--custom-node {
    display: flex;
    justify-content: space-between;

    .tree--custom-node-text {
      width: calc(100%);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      display: block;
    }

    .anticon,
    .iconfont {
      margin-right: 4px;
    }

    &.disabled {
      cursor: default;
      .tree--custom-node-text {
        color: @disabled-color;
      }
    }
  }

  li {
    padding: 2px 0;
    span[draggable='true'] {
      line-height: 24px;
      cursor: grab;
    }
    span.ant-tree-switcher,
    span.ant-tree-iconEle {
      border-top: 2px solid transparent;
      border-bottom: 2px solid transparent;
      width: 15px;
      line-height: 20px;
    }

    .ant-tree-child-tree {
      & > li:first-child {
        padding-top: 4px;
      }
    }

    span.ant-tree-checkbox {
      z-index: 1;

      & + .ant-tree-node-content-wrapper {
        width: calc(100% - 32px);
      }
    }

    span.ant-tree-node-content-wrapper:before {
      position: absolute;
      right: 0;
      left: 0;
      height: 24px;
      transition: all 0.3s;
      content: '';
    }

    span.ant-tree-node-content-wrapper span,
    span.ant-tree-switcher {
      position: relative;
      z-index: 1;
    }

    .ant-tree-node-content-wrapper:hover {
      background-color: transparent;

      .tree--custom-node-menu {
        display: block;
      }
    }

    .ant-tree-node-content-wrapper:hover:before {
      background-color: #e6f7ff;
    }

    .ant-tree-node-content-wrapper.ant-tree-node-selected:before {
      background: #1890ff;
    }

    .ant-tree-node-content-wrapper.ant-tree-node-selected {
      color: #fff;
      background-color: transparent;
      .tree--custom-node-menu {
        display: block;
      }

      a {
        color: #fff;
      }
    }

    &.ant-tree-treenode-selected {
      > span.ant-tree-switcher {
        color: #fff;
      }
    }
  }

  &.has-menu {
    //& li {
    //
    //}
    .tree--custom-node-text {
      width: calc(100% - 20px);
    }

    .tree--custom-node-menu {
      display: none;
    }
  }

  & > li:last-child {
    padding-bottom: 4px;
  }

  & > li:first-child {
    padding-top: 4px;
  }
}